<?php defined('BASEPATH') OR exit('No direct script access allowed');?>

<!DOCTYPE html>
<html lang="en">
	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta charset="utf-8" />
		<title>会员注册 - <?php echo $this->config->item('site_name');?></title>
		<meta name="description" content="User login page" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
		<!-- bootstrap & fontawesome -->
		<?php echo css_url('bootstrap');?>
		<?php echo css_url('font-awesome');?>

		<!-- text fonts -->
		<?php echo css_url('ace-fonts');?>

		<!-- ace styles -->
		<?php echo css_url('ace');?>

		<!--[if lte IE 9]>
			<?php echo css_url('ace-part2');?>
		<![endif]-->
		<?php echo css_url('ace-rtl');?>

		<!--[if lte IE 9]>
		  <?php echo css_url('ace-ie');?>
		<![endif]-->
		<?php echo css_url('fox');?>

		<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->

		<!--[if lt IE 9]>
		<?php echo js_url('html5shiv');?>
		<?php echo js_url('respond');?>
		<![endif]-->
	</head>

	<body class="login-layout blur-login">
		<div class="main-container" id="body-wrapper">
			<div class="main-content">
				<div class="row">
					<div class="col-sm-12 loginlogo"><a href="<?php echo site_url();?>" title="<?php echo $this->config->item('site_name');?>"><img src="<?php echo $viewmulu.'/img/login_logo.png';?>" alt="<?php echo $this->config->item('site_name');?>" border="0"></a>
					</div>
					<div class="col-sm-10 col-sm-offset-1">
						<div class="login-container ptop100">
							<div class="center">
								<h2>
									<span class="red" id="id-text2">会员注册</span>							
								</h2>
							</div>

							<div class="space-6"></div>

							<div class="position-relative">
								<div id="login-box" class="login-box visible widget-box no-border">
									<div class="widget-body">
										<div class="widget-main">
											<h4 class="header lighter red">
												<i class="ace-icon fa fa-coffee red"></i>
												请输入注册信息
											</h4>

											<div class="space-6"></div>

											<form accept-charset="UTF-8" action="<?php echo site_url('user/register/'.$tuijianren);?>" class="form-horizontal" id="new_user" method="post" novalidate="novalidate">
											<?php echo csrf_hidden();?>
											<?php if(form_error('username')){?>
												<div class="alert alert-danger">
													<button type="button" class="close" data-dismiss="alert"><i class="ace-icon fa fa-times"></i></button><i class="ace-icon fa fa-times"></i><?php echo form_error('username','<span> ','</span>');?></span>
												</div>
											<?php }?>
											<?php if(form_error('password')){?>
												<div class="alert alert-danger">
													<button type="button" class="close" data-dismiss="alert"><i class="ace-icon fa fa-times"></i></button><i class="ace-icon fa fa-times"></i><?php echo form_error('password','<span> ','</span>');?></span>
												</div>
											<?php }?>
											<?php if(form_error('upassword')){?>
												<div class="alert alert-danger">
													<button type="button" class="close" data-dismiss="alert"><i class="ace-icon fa fa-times"></i></button><i class="ace-icon fa fa-times"></i><?php echo form_error('upassword','<span> ','</span>');?></span>
												</div>
											<?php }?>
											<?php if(form_error('utel')){?>
												<div class="alert alert-danger">
													<button type="button" class="close" data-dismiss="alert"><i class="ace-icon fa fa-times"></i></button><i class="ace-icon fa fa-times"></i><?php echo form_error('utel','<span> ','</span>');?></span>
												</div>
											<?php }?>
											<?php if(form_error('tuijianren')){?>
												<div class="alert alert-danger">
													<button type="button" class="close" data-dismiss="alert"><i class="ace-icon fa fa-times"></i></button><i class="ace-icon fa fa-times"></i><?php echo form_error('tuijianren','<span> ','</span>');?></span>
												</div>
											<?php }?>
												<fieldset>
													<label class="block clearfix">
														<span class="block input-icon input-icon-right">
															<input type="text" class="form-control" placeholder="请输入帐户" id="username" name="username" value="<?php echo set_value('username'); ?>" />
															<i class="ace-icon fa fa-user"></i>
														</span>
													</label>

													<label class="block clearfix">
														<span class="block input-icon input-icon-right">
															<input type="password" class="form-control" placeholder="请输入密码" id="password" name="password" value="<?php echo set_value('password'); ?>" />
															<i class="ace-icon fa fa-lock"></i>
														</span>
													</label>
													
													<label class="block clearfix">
														<span class="block input-icon input-icon-right">
															<input type="password" class="form-control" placeholder="请输入确认密码" id="upassword" name="upassword" value="<?php echo set_value('upassword'); ?>" />
															<i class="ace-icon fa fa-lock"></i>
														</span>
													</label>
													
													<label class="block clearfix">
														<span class="block input-icon input-icon-right">
															<input type="text" class="form-control" placeholder="请输入手机号" id="utel" name="utel" value="<?php echo set_value('utel'); ?>" />
															<i class="ace-icon fa fa-phone"></i>
														</span>
													</label>

													<label class="clearfix" style="display:none;">
														<span class="block input-icon input-icon-right">
															<input type="text" class="form-control" placeholder="请输入推荐ID" id="tuijianren" name="tuijianren" value="<?php echo set_value('daliuid',$tuijianren); ?>" />
															<i class="ace-icon fa fa-flag-o"></i>
														</span>
													</label>
													
													<div class="space"></div>

													<div class="clearfix">
														<button type="submit" class="btn btn-sm pull-right btn-info">
															<i class="ace-icon fa fa-check"></i>
															<span class="bigger-110">提交注册信息</span>
														</button>
													</div>

													<div class="space-4"></div>
												</fieldset>
											</form>

										</div><!-- /.widget-main -->
									</div><!-- /.widget-body -->
									<div class="toolbar clearfix">
										<div>
											<a href="<?php echo site_url();?>" class="forgot-password-link">
												<i class="fa fa-arrow-left"></i>
												返回首页
											</a>
										</div>

										<div>
											<a href="<?php echo site_url('user/login');?>" class="user-signup-link">
												会员登陆
												<i class="fa fa-arrow-right"></i>
											</a>
										</div>
									</div>
								</div><!-- /.login-box -->
							</div><!-- /.position-relative -->
						</div>
					</div><!-- /.col -->
				</div><!-- /.row -->
			</div><!-- /.main-content -->
			<div id="bgPattern"></div>
		
		<!-- basic scripts -->

		<!--[if !IE]> -->
		<script type="text/javascript">
			window.jQuery || document.write("<?php echo admin_js_url('jquery');?>");
		</script>

		<!-- <![endif]-->

		<!--[if IE]>
<script type="text/javascript">
 window.jQuery || document.write("<?php echo admin_js_url('jquery1x');?>");
</script>
<![endif]-->
<script type="text/javascript">
	if('ontouchstart' in document.documentElement) document.write("<?php echo admin_js_url('jquery.mobile.custom');?>");
	$(function(){
		do_bottom();        
	});
	jQuery(function($) {
	 $(document).on('click', '.toolbar a[data-target]', function(e) {
		e.preventDefault();
		var target = $(this).data('target');
		$('.widget-box.visible').removeClass('visible');//hide others
		$(target).addClass('visible');//show target
	 });
	});
	
	
	
	//you don't need this, just used for changing background
	jQuery(function($) {
	 $('#btn-login-dark').on('click', function(e) {
		$('body').attr('class', 'login-layout');
		$('#id-text2').attr('class', 'white');
		$('#id-company-text').attr('class', 'blue');
		
		e.preventDefault();
	 });
	 $('#btn-login-light').on('click', function(e) {
		$('body').attr('class', 'login-layout light-login');
		$('#id-text2').attr('class', 'grey');
		$('#id-company-text').attr('class', 'blue');
		
		e.preventDefault();
	 });
	 $('#btn-login-blur').on('click', function(e) {
		$('body').attr('class', 'login-layout blur-login');
		$('#id-text2').attr('class', 'white');
		$('#id-company-text').attr('class', 'light-blue');
		
		e.preventDefault();
	 });
	 
	});
</script>
<?php echo js_url('bootstrap');?>
<?php echo js_url('jquery.backstretch.min');?>
<script type="text/javascript">
$(document).ready(function () { 
	$("body").backstretch([
      "<?php echo $viewmulu.'/img/bg.jpg';?>"
    ], {duration: 3000, fade: 300});	
});
</script>
</body>
</html>
